package top.maof.book.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import top.maof.book.model.Likes;

@Mapper
public interface LikesMapper extends BaseMapper<Likes> {
    @Select("select count(id) from likes where  book_id = #{bookId}")
    Integer likesNum(@Param("bookId") Integer bookId);
}
